package org.jeecg.jxc.base.goods.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.jxc.base.goods.entity.Goods;
import org.jeecg.jxc.base.goods.entity.GoodsExample;
import org.jeecg.jxc.base.goods.entity.Unit;

public interface GoodsMapper {
    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer goodsId);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer goodsId);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);
    //查询所有商品单位
    List<Unit> selectUnit();
    //带条件连表分页查询商品
    List<Goods> pageGoods(@Param("page") Integer page,@Param("pageSize")Integer pageSize,@Param("goodsName") String goodsName, @Param("goodsTypeId")Integer goodsTypeId);
    //带条件连表分页查询计数
    Integer pageGoodsCount(@Param("page") Integer page,@Param("pageSize")Integer pageSize,@Param("goodsName") String goodsName, @Param("goodsTypeId")Integer goodsTypeId);
}